const toast = ({
	title,
	icon = "none",
	duration = 2000
}) => {
	uni.showToast({
		title: title,
		icon: icon,
		duration: duration
	})
}

toast.error = ({
	title,
	duration = 2000
}) => {
	// toast({title, icon:'error',duration})
	uni.showToast({
		title: title,
		icon: 'error',
		duration: duration
	})
}

toast.success = ({
	title,
	duration = 2000
}) => {
	toast({
		title,
		icon: 'success',
		duration
	})
	// uni.showToast({
	// 	title: title,
	// 	icon: 'success',
	// 	duration: duration
	// })
}

export default toast
